package com.xiaoxu.base.config;

import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import com.xiaoxu.base.utils.IdGenerator;
import org.springframework.stereotype.Component;

/**
 * @author xiaoxu
 * @version 1.0
 * @description 自定义Id生成器
 * @date 2023/1/17 20:11
 */
@Component
public class IdGeneratorConfig implements IdentifierGenerator {

    @Override
    public Long nextId(Object entity) {
        return IdGenerator.generateId();
    }
}
